package com.qf.air.dto;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author zjw
 * @description
 * @date 2021/10/9 11:01
 */
public class AirAddDTO {

    @NotNull(message = "检测区域为必传项，岂能为空！")
    private Integer districtId;

    @NotNull(message = "检测时间为必传项，岂能为空！")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date monitorTime;

    @NotNull(message = "pm10为必传项，岂能为空！")
    @Min(value = 0,message = "pm10最小值为0！")
    private Integer pm10;

    @NotNull(message = "pm2.5为必传项，岂能为空！")
    @Min(value = 0,message = "pm2.5最小值为0！")
    private Integer pm25;

    @NotBlank(message = "检测站为必传项，岂能为空！")
    private String monitoringStation;

    @Override
    public String toString() {
        return "AirAddDTO{" +
                "districtId=" + districtId +
                ", monitorTime=" + monitorTime +
                ", pm10=" + pm10 +
                ", pm25=" + pm25 +
                ", monitoringStation='" + monitoringStation + '\'' +
                '}';
    }

    public Integer getDistrictId() {
        return districtId;
    }

    public void setDistrictId(Integer districtId) {
        this.districtId = districtId;
    }

    public Date getMonitorTime() {
        return monitorTime;
    }

    public void setMonitorTime(Date monitorTime) {
        this.monitorTime = monitorTime;
    }

    public Integer getPm10() {
        return pm10;
    }

    public void setPm10(Integer pm10) {
        this.pm10 = pm10;
    }

    public Integer getPm25() {
        return pm25;
    }

    public void setPm25(Integer pm25) {
        this.pm25 = pm25;
    }

    public String getMonitoringStation() {
        return monitoringStation;
    }

    public void setMonitoringStation(String monitoringStation) {
        this.monitoringStation = monitoringStation;
    }
}
